#!/user/bin/env python3
# -*- coding: utf-8 -*-
"""
--------------------------------------
    Author:     JiChao_Song
    Date  :     2020/11/13 13:33
    Desc  :
--------------------------------------
"""
from application import app
from servers.controllers.admin.ProjectController import project_admin_route
from servers.controllers.common.BaseUtils import base_route
from servers.controllers.common.HeadersController import headers_route
from servers.controllers.common.UploadController import file_router
from servers.controllers.common.VariableController import variable_route
from servers.controllers.organize.ApiCaseController import api_route
from servers.controllers.organize.CaseRecordController import case_record_route
from servers.controllers.organize.CaseSuiteController import case_suite_route
from servers.controllers.organize.CaseController import case_route

from servers.controllers.organize.HomeController import home_route
from servers.controllers.organize.ProjectController import project_organize_route
from servers.controllers.organize.UserController import user_route as organize_user
from servers.controllers.organize.InterfaceController import interface_route
from servers.controllers.admin.logController import log_route
from servers.controllers.admin.index import index_router
from servers.controllers.admin.UserController import user_route as admin_user

# commom
app.register_blueprint(file_router, url_prefix="")
app.register_blueprint(index_router, url_prefix='/')
app.register_blueprint(base_route, url_prefix='/organize')

# organize
app.register_blueprint(home_route, url_prefix="/organize/home")
app.register_blueprint(interface_route, url_prefix='/organize/interface')
app.register_blueprint(case_route, url_prefix="/organize/case")
app.register_blueprint(organize_user, url_prefix="/organize/user")
app.register_blueprint(project_organize_route, url_prefix="/organize/project")
app.register_blueprint(case_record_route, url_prefix="/organize/caserecord")
app.register_blueprint(case_suite_route, url_prefix="/organize/casesuite")
app.register_blueprint(api_route, url_prefix="/organize/apicase")
app.register_blueprint(
    variable_route, url_prefix="/organize/variable")           # 全局变量
app.register_blueprint(
    headers_route, url_prefix="/organize/headers")             # 请求头

# admin
app.register_blueprint(index_router, url_prefix="/admin/")
app.register_blueprint(log_route, url_prefix="/admin/log")
app.register_blueprint(admin_user, url_prefix="/admin/user")
app.register_blueprint(project_admin_route, url_prefix="/admin/project")
